package kr.hyunist.androidcomplete01saeildamil.ch13;

import kr.hyunist.androidcomplete01saeildamil.*;
import android.app.*;
import android.os.*;
import android.widget.*;
import android.widget.RatingBar.OnRatingBarChangeListener;

public class RatingbarTest extends Activity {
	RatingBar mRating;
	TextView mRateText;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ratingbartest);
		
		mRating = (RatingBar) findViewById(R.id.ratingBartest1);
		mRateText = (TextView) findViewById(R.id.ratingBartextView1);
		
		mRating.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
			
			@Override
			public void onRatingChanged(RatingBar ratingBar, float rating,
					boolean fromUser) {
				mRateText.setText("Now Rate : " + rating);
			}
			
		});
	}
}
